#include "cilib.h"

void ciGetImageSize(void* ptr, int *width, int *height)
{
    *width = ((BITMAPINFOHEADER*)((BYTE*)ptr+sizeof(BITMAPFILEHEADER)))->biWidth;
    *height = ((BITMAPINFOHEADER*)((BYTE*)ptr+sizeof(BITMAPFILEHEADER)))->biHeight;
}

int ciGetImageBitCount(void* ptr)
{
    int bitcount=((BITMAPINFOHEADER*)((BYTE*)ptr+sizeof(BITMAPFILEHEADER)))->biBitCount;
    return bitcount;
}

PIXEL* ciGetImageArray(void* ptr)
{
    return (PIXEL*)(((BITMAPFILEHEADER*)ptr)->bfOffBits+ptr);
}
    
